package com.elitel.frame.main.dao;

import com.elitel.frame.main.entity.AcAppService;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author hi_bj
 * @description 针对表【ac_app_service(访问控制-应用和服务权限关系)】的数据库操作Mapper
 * @createDate 2023-10-24 16:45:21
 * @Entity com.elitel.frame.main.entity.AcAppService
 */
public interface AcAppServiceMapper {

    int deleteByPrimaryKey(String id);

    int insert(AcAppService record);

    int insertSelective(AcAppService record);

    AcAppService selectByPrimaryKey(String id);

    List<AcAppService> selectByCatalogIds(@Param("catalogIds") List<String> catalogIds);

    List<AcAppService> selectByServiceIds(@Param("serviceIds") List<String> serviceIds);

    int updateByPrimaryKeySelective(AcAppService record);

    int updateByPrimaryKey(AcAppService record);

    List<AcAppService> getAllByAppId(String appId);

    List<AcAppService> getAllByServiceId(String serviceId);

    int deleteByAppId(String appId);

    int deleteByServiceId(String serviceId);


    List<AcAppService> selectAppServiceList();

    int deleteByAppIdsAndServiceId(@Param("serviceId") String serviceId, @Param("unAppIdList") List<String> unAppIdList);

    @MapKey("guid")
    List<Map> getGuidCountsOfApp();
}
